<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="/WEB-INF/template/basicTemplate.xhtml">
	<ui:define name="content">
		<h:head>
			<title><h:outputText value="#{msg.ticket}" /></title>
		</h:head>
		<!-- <f:event listener="#{biletBean.getAllBilete()}" type="preRenderView"></f:event>
		-->
		<h:body>

			<h:form>
				<div align="center">
					<h:dataTable value="#{biletBean.bilete}" var="o">

						<h:column>

							<f:facet name="header">
								<h:outputText value="#{msg.lastname}" />
							</f:facet>

							<h:outputText value="#{o.lastname}" size="10" />

						</h:column>

						<h:column>

							<f:facet name="header">
								<h:outputText value="#{msg.firstname}" />
							</f:facet>

							<h:outputText value="#{o.firstname}" size="20" />

						</h:column>

						<h:column>

							<f:facet name="header">
								<h:outputText value="#{msg.motive}" />
							</f:facet>

							<h:outputText value="#{o.motiv}" size="10" />

						</h:column>

						<h:column>

							<f:facet name="header">
								<h:outputText value="#{msg.start}" />
							</f:facet>

							<h:outputText value="#{o.start_time}" size="10" />

						</h:column>

						<h:column>

							<f:facet name="header">
								<h:outputText value="#{msg.end}" />
							</f:facet>

							<h:outputText value="#{o.end_time}" size="10" />

						</h:column>


						<h:column>

							<f:facet name="header">
								<h:outputText value="#{msg.approve}" />
							</f:facet>

							<h:commandButton image="/resources/images/check.png"
								action="#{biletBean.aprova(o)}" />

						</h:column>

						<h:column>

							<f:facet name="header">
								<h:outputText value="#{msg.refuse}" />
							</f:facet>

							<h:commandButton image="/resources/images/cross.png"
								action="#{biletBean.refuza(o)}" />

						</h:column>



					</h:dataTable>


					<h:commandButton value="#{msg.back}" styleClass="button"
						action="#{loginBean.inapoiTL()}" />


				</div>
			</h:form>
		</h:body>
	</ui:define>
</ui:composition>
</html>